using System;
using System.Collections.Generic;
using System.Text;
using NHibernate.Cfg;
using NHibernate;
using Dominio;


namespace DAP
{
    public class TesterRepository : UserRepository<Tester>
    {

        public TesterRepository()
        {
            
        }

        public IList<Tester> getAllTester()
        {
            ISession sesion = sesiones.OpenSession();
            ITransaction transaction = sesion.BeginTransaction();
            try
            {
                IQuery query = sesion.CreateQuery("from Tester");
                transaction.Commit();
                IList<Tester> testerList = query.List<Tester>();
                return testerList;
            }
            catch (Exception)
            {
                transaction.Rollback();
                throw new HibernateException();
            }
        }        
    }
}
